package com.sukaiyi.generator.ui.renderer;

import com.intellij.icons.AllIcons;
import com.intellij.ide.ui.UISettings;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import org.jetbrains.annotations.NotNull;

public abstract class CloseTabAction extends AnAction {

    @Override
    public void update(@NotNull AnActionEvent e) {
        super.update(e);
        e.getPresentation().setIcon(AllIcons.Actions.Close);
        e.getPresentation().setHoveredIcon(AllIcons.Actions.CloseHovered);
        e.getPresentation().setVisible(UISettings.getInstance().getShowCloseButton());
    }
}
